![]() |
ReserveEntry |
||||
Header: | Quickdraw.h | Carbon status: | Supported | |
Reserves or removes reservation from an entry in the current GDevice data structure’s color table. This function is used by system software and your application should not need to call it.
void ReserveEntry ( SInt16 index, Boolean reserve );
The index to the entry.
True to reserve the entry, false to remove the reservation.
A reserved entry cannot be matched by another application’s search function, and Color2Index (or other functions that depend on it such as RGBForeColor, RGBBackColor, and SetCPixel) never return that entry to another client. You could use this function to selectively protect a color for color table animation.
The ReserveEntry function copies the low byte of the gdID field of the current GDevice data structure into the low byte of the ColorSpec.value field of the color table when reserving an entry, and leaves the high byte alone. ReserveEntry acts like selective protection and does not allow any changes if the current gdID field is different than the one in the ColorSpec.value field of the reserved entry. If a requested match is already reserved, ReserveEntry returns a protection error. It can remove reservation from any entry, even if a requested match is already not reserved.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)